<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    body{
      background-color: #f2f2f2;
    }
    canvas {
      background-color: #fff;
    }
  </style>
</head>
<body>
  <canvas id="myCanvas" width="400" height="300">
    您的浏览器不支持 Canvas
  </canvas>
  <script>
    /** @type {HTMLCanvasElement} */
    var canvas = document.getElementById('myCanvas');
    var ctx = canvas.getContext('2d'); 

    ctx.beginPath();
    // 画一个圆 arc
    ctx.arc(60, 60, 50, 0, Math.PI * 2, true);
    ctx.fill();

    // 画一个空心圆 
    ctx.moveTo(60, 115); 
    ctx.arc(60, 165, 50, 1.5 * Math.PI , Math.PI * 3.5, false);
    ctx.stroke();
  </script>
</body>
</html>